﻿using System;
using System.Threading;
using System.Windows.Forms;
using LCARSLibrary;
using Cepheus;

namespace LCARS_Interface
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            Mutex mutex = new Mutex(false, "{5EBD21E6-A3C0-47AF-AE3F-01CCAFA3D270}");

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            if (!mutex.WaitOne(3000, false))
                return;

            Settings<MISettings>.Initialize("settings.xml", SerializationType.XML);
            Application.Run(new FormMain());

            mutex.ReleaseMutex();
        }
    }
}
